import Vue from 'vue'
import Router from 'vue-router'
import Home from './views/Home.vue'
import List from './views/list.vue'
import Detail from './views/Detail.vue'

Vue.use(Router)

let routes = [
  { path: '/list/:id', component: List },
  { path: '/detail/:id', component: Detail },
  { path: '/home', component: Home },
  { path: '*', redirect: '/home' }

]
// export default new Router({ routes })
var router = new Router({ routes });
export default router;
